﻿import request from '/@/utils/request';
enum Api {
  AddProject = '/api/project/add',
  DeleteProject = '/api/project/delete',
  UpdateProject = '/api/project/update',
  PageProject = '/api/project/page',
  DetailProject = '/api/project/detail',
}

// 增加项目
export const addProject = (params?: any) =>
	request({
		url: Api.AddProject,
		method: 'post',
		data: params,
	});

// 删除项目
export const deleteProject = (params?: any) => 
	request({
			url: Api.DeleteProject,
			method: 'post',
			data: params,
		});

// 编辑项目
export const updateProject = (params?: any) => 
	request({
			url: Api.UpdateProject,
			method: 'post',
			data: params,
		});

// 分页查询项目
export const pageProject = (params?: any) => 
	request({
			url: Api.PageProject,
			method: 'post',
			data: params,
		});

// 详情项目
export const detailProject = (id: any) => 
	request({
			url: Api.DetailProject,
			method: 'get',
			data: { id },
		});


